wt_widget.js
Summary
This file contains all non-vector and non-form visible widgets
Class Summary
|
wtAnchor |
A wtAnchor can be used in two ways:
It can be used as a traditional HTML anchor (i.e. a hyperlink) by setting a href attribute to it via
setHref()
Or, it can be used as a text-only button by setting an event handler to it via
setHandler()
|
wtAttachedMenu |
A popup menu attached to some widget. |
wtBlockSpacer |
An area of empty space with block layout. |
wtButton |
This class provides you a typical image-based button with graphical effects. |
wtColumnLayout |
A widget that layouts it schild widgets along a column. |
wtContextMenu |
A popup menu that appears when the user right clicks on a widget. |
wtDisplay |
A tabular display with an optional caption. |
wtDisplayCell |
A table cell used in wtDisplay. |
wtDisplayRow |
A display row used in a display table. |
wtImage |
A raster image object. |
wtModalWindow |
A wtModalwindow is similar to wtWindow, except that it is created modal by default. |
wtNotebook |
A basic tabbed container. |
wtNotebookPage |
A tabbed page container for use with wtNotebook. |
wtPopupMenu |
A basic popup menu with soft drop shadow, this class is not meant to be used in a web application directly. |
wtRowLayout |
A widget that layouts its child widgets along a row. |
wtShadowWidget |
This widget is a container that adds a soft drop shadow around the rectangular bounding box around its contents
|
wtSpacer |
An area of empty space with inline layout. |
wtTextBlock |
A shadowed text block. |
wtTreeNode |
A tree node, freely expandable to form a tree. |
wtView |
A view container in WT Toolkit is a fixed size container with automatic scroll bars and optional borders
It is typically used as a part of more sophisticated widget containes, e.g. a wtWindow
|
wtWidget |
The base class of all visible widgets. |
wtWindow |
A wtWindow is a draggable container widget with a title bar (empty by default), a wtView container area and soft drop shadow
|
var wtBindSignal = function(_retval)
{
if (!_retval)
return;
_retval.linkSignal("Click", "onclick");
_retval.linkSignal("MouseDown", "onmousedown");
_retval.linkSignal("MouseOver", "onmouseover");
_retval.linkSignal("MouseOut", "onmouseout");
_retval.linkSignal("MouseUp", "onmouseup");
_retval.linkSignal("Focus", "onfocus");
_retval.linkSignal("Blur", "onblur");
_retval.linkSignal("DoubleClick", "ondblclick");
_retval.linkSignal("KeyDown", "onkeydown");
_retval.linkSignal("KeyUp", "onkeyup");
_retval.linkSignal("KeyPress", "onkeypress");
_retval.linkSignal("Resize", "onresize");
}
var wtWidget = function(_parent, _tagName)
{
if (arguments.length < 2)
return;
var domNode;
var tag = _tagName.toLowerCase();
domNode = document.createElement(_tagName);
this.startProxy(domNode);
$_(this).id = this.toString();
domNode.className = "wtRoot";
if (domNode["style"] == undefined)
domNode["style"] = {};
wtBindSignal(this);
this.setRelativePosition(0,0);
this.setLevel(0);
if (_tagName.toLowerCase() == "td" || _tagName.toLowerCase() == "div" || _tagName.toLowerCase() == "span")
domNode.align = "left";
var _noStyle = {"tr":1, "tbody":1};
var _noTranslucency = {"tr":1, "tbody":1, "td":1, "th":1};
if (isMSIE() && _noTranslucency[_tagName.toLowerCase()] == undefined)
domNode.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=100,enabled=false)";
this.setSlot("Drag", this.dragSlot);
this.setSlot("SetDragging", this.setDraggingSlot);
this.setSlot("UnsetDragging", this.unsetDraggingSlot);
this.setSignal("Move");
this.setSignal("DragStart");
this.setSignal("DragEnd");
if (_parent)
{
if (isDOMNode(_parent))
_parent.appendChild(domNode);
else
_parent.addWidget(this);
}
}
wtWidget.prototype = new wtObject;
wtWidget.prototype.setStaticPosition = function() {
$_(this).style.position = "static";
this.emit("Move", new wt2DPoint(this.get("offsetLeft"), this.get("offsetTop")));
}
wtWidget.prototype.setRelativePosition = function(x, y)
{
$_(this).style.position = "relative";
$_(this).style.left = x + "px";
$_(this).style.top = y + "px";
this.emit("Move", new wt2DPoint(this.get("offsetLeft"), this.get("offsetTop")));
}
wtWidget.prototype.setAbsolutePosition = function(x, y)
{
this.setStyle("position", "absolute");
this.setStyle("left", x+"px");
this.setStyle("top", y+"px");
this.emit("Move", new wt2DPoint(x, y));
}
wtWidget.prototype.getAbsolutePosition = function()
{
var domNode = $_(this);
if (!domNode) return;
return {"x" : parseInt(domNode.offsetLeft), "y" : parseInt(domNode.offsetTop)};
}
wtWidget.prototype.getScreenPosition = function()
{
var x = 0;
var y = 0;
var curNode = $_(this);
while(curNode != null)
{
if (isInteger(curNode.offsetLeft) && isInteger(curNode.scrollLeft))
x += curNode.offsetLeft - curNode.scrollLeft;
if (isInteger(curNode.offsetTop) && isInteger(curNode.scrollTop))
y += curNode.offsetTop - curNode.scrollTop;
try
{
if (curNode.offsetParent)
true;
}
catch(e)
{
return;
}
curNode = curNode.offsetParent;
}
if (! isMSIE())
{
x -= window.scrollX;
y -= window.scrollY;
}
return {"x":x, "y":y};
}
wtWidget.prototype.setPosition = function(x, y)
{
var domNode = $_(this);
domNode.style.position = "absolute";
domNode.style.left = domNode.style.top = domNode.style.right = domNode.style.bottom = "";
domNode.style.left = domNode.offsetLeft + x + "px";
domNode.style.top = domNode.offsetTop + y + "px";
}
wtWidget.prototype.setSize = function(_width, _height)
{
var domNode = $_(this);
domNode.style.height = dimension(_height);
domNode.style.width = dimension(_width);
}
wtWidget.prototype.setVisible = function(yes){$_(this).style.visibility = yes ? "visible" : "hidden";}
wtWidget.prototype.setDisplay = function(yes)
{
$_(this).style.display = yes ? "" : "none";
}
wtWidget.prototype.setAlpha = function(opacity)
{
var domNode = $_(this);
if (isMSIE())
{
if (domNode.currentStyle.hasLayout == false)
throw "wtWidget::setAlpha(): Cannot set transparency on widget without a layout on IE!";
if (opacity == 1.0)
domNode.filters.item("DXImageTransform.Microsoft.Alpha").enabled = false;
else
{
domNode.filters.item("DXImageTransform.Microsoft.Alpha").enabled = true;
domNode.filters.item("DXImageTransform.Microsoft.Alpha").opacity = opacity * 100;
}
}
else
domNode.style.opacity = opacity;
}
wtWidget.prototype.setDraggable = function(yes)
{
var domNode = $_(this);
if (yes)
{
if (domNode.style.position != "absolute")
{
throw "setDraggable(): Widget to set draggable must be absolutely positioned";
}
domNode.dragging = false;
this.connect("set_dragging", "MouseDown", this, "SetDragging");
}
else
this.disconnect("set_dragging", "MouseDown");
}
wtWidget.prototype.setDragArea = function(leftLimit, topLimit, rightLimit, bottomLimit)
{
var domNode = $_(this);
domNode.dragArea = {};
domNode.dragArea.leftLimit = leftLimit;
domNode.dragArea.topLimit = topLimit;
domNode.dragArea.rightLimit = rightLimit;
domNode.dragArea.bottomLimit = bottomLimit;
}
wtWidget.prototype.unsetDragArea = function()
{
var domNode = $_(this);
domNode.dragArea = undefined;
}
wtWidget.prototype.setSelectable = function(yes)
{
var domNode = $_(this);
if (navigator.userAgent.search("MSIE") != -1)
{
domNode.setAttribute("UNSELECTABLE", (yes ? "off" : "on"));
for(var i=0;i<domNode.childNodes.length;i++)
{
if (domNode.childNodes.item(i).setSelectable)
domNode.childNodes.item(i).setSelectable(yes);
}
}
else
{
domNode.style.MozUserSelect = yes ? "" : "none";
}
domNode.style.cursor = yes ? "" : "default";
}
wtWidget.prototype.setEnabled = function(yes)
{
var domNode = $_(this);
domNode.wtDisabled = !yes;
if (domNode.coverBlock == undefined)
{
domNode.coverBlock = new wtImage(this, "images/1ptrans.gif");
$_(domNode.coverBlock).wtDependency = this.toString();
}
var coverBlock = domNode.coverBlock;
if (yes)
{
coverBlock.setDisplay(false);
}
else
{
if ($_(coverBlock).parentNode)
$_(coverBlock).parentNode.removeChild($_(coverBlock));
domNode.parentNode.appendChild($_(coverBlock));
coverBlock.setAbsolutePosition(domNode.offsetLeft, domNode.offsetTop);
coverBlock.setSize(domNode.offsetWidth, domNode.offsetHeight);
coverBlock.setLevel(parseInt(domNode.style.zIndex) + 1);
coverBlock.setDisplay(true);
}
}
wtWidget.prototype.isEnabled = function()
{
return !($_(this).wtDisabled);
}
wtWidget.prototype.isInside = function(x, y)
{
var domNode = $_(this);
var myCoords = this.getScreenPosition();
try
{
if (myCoords.x)
true;
}
catch(e)
{
return false;
}
var xMin = myCoords.x;
var yMin = myCoords.y;
var xMax = parseInt(xMin) + parseInt(domNode.offsetWidth);
var yMax = parseInt(yMin) + parseInt(domNode.offsetHeight);
if (x >= xMin && x <= xMax && y >= yMin && y <= yMax)
return true;
return false;
}
wtWidget.prototype.removeSelf = function()
{
if ($_(this).parentNode)
$_(this).parentNode.removeChild($_(this));
}
wtWidget.prototype.clearAll = function()
{
var domNode = $_(this);
while(domNode.childNodes.length)
{
var node = domNode.childNodes.item(0);
if (_$(node) instanceof wtWidget)
_$(node).removeSelf();
else
node.parentNode.removeChild(node);
}
}
wtWidget.prototype.setLevel = function(level)
{
if (_$(this.get("parentNode")) instanceof wtCanvas && level == 0)
{
this.get("style").zIndex = 1;
return;
}
$_(this).style.zIndex = level;
}
wtWidget.prototype.addWidget = function(obj)
{
var domNode = $_(this);
if (!isDOMNode(obj))
{
if (typeof(obj) == "string")
{
var strArray = obj.split("\n");
var lastWidget;
for(var i=0;i<strArray.length;i++)
{
if (strArray[i].length == 0 && i == strArray.length -1) continue;
domNode.appendChild(document.createTextNode(strArray[i]));
if (obj.indexOf("\n") != -1)
lastWidget = new wtWidget(this, "br");
}
return lastWidget;
}
else if (! $_(obj))
{
throw "wtWidget::addWidget(): Object must be managed by WT Toolkit";
}
else
{
domNode.appendChild($_(obj));
return obj;
}
}
else
throw "Adding raw DOM nodes is no longer supported";
}
wtWidget.prototype.dragSlot = function(myself, evt, source)
{
var widget = $_(myself);
if (widget.dragging)
{
if (isMSIE())
widget.style.margin = "0px 0px 0px 0px";
var x = mouse.x;
var y = mouse.y;
myself.setAbsolutePosition(widget.offsetLeft + x - widget.prevX, widget.offsetTop + y - widget.prevY);
widget.prevX = x;
widget.prevY = y;
}
}
wtWidget.prototype.setDraggingSlot = function(myself, evt, source)
{
if (evt)
{
if (isMSIE() && evt.button != 1)
return;
else if (! isMSIE() && evt.button != 0)
return;
}
var widget = $_(myself);
if (widget.dragArea != undefined)
{
var widgetCoordinate = myself.getScreenPosition();
var leftLimit = widgetCoordinate.x + widget.dragArea.leftLimit;
var rightLimit = widgetCoordinate.x + widget.dragArea.rightLimit;
var topLimit = widgetCoordinate.y + widget.dragArea.topLimit;
var bottomLimit = widgetCoordinate.y + widget.dragArea.bottomLimit;
if (mouse.x < leftLimit || mouse.x > rightLimit)
return;
if (mouse.y < topLimit || mouse.y > bottomLimit)
return;
}
widget.dragging = true;
window.mouse.connect(myself.toString(), "MouseUp", myself, "UnsetDragging");
window.mouse.connect(myself.toString(), "MouseMove", myself, "Drag");
widget.prevX = mouse.x;
widget.prevY = mouse.y;
myself.emit("DragStart", evt);
}
wtWidget.prototype.unsetDraggingSlot = function(myself, evt, source)
{
var widget = $_(myself);
widget.dragging = false;
window.mouse.disconnect(myself.toString(), "MouseUp");
window.mouse.disconnect(myself.toString(), "MouseMove");
myself.emit("DragEnd", evt);
}
wtWidget.prototype.linkSignal = function(signalName, eventName)
{
var sig = $_(this).wtSignals;
if (sig == undefined)
{
$_(this).wtSignals = {};
sig = $_(this).wtSignals;
}
if (sig[signalName] == undefined)
sig[signalName] = {};
$_(this)[eventName] = function()
{
var evt;
if (navigator.userAgent.search("MSIE") != -1)
evt = window.event;
else
evt = arguments[0];
try
{
if (_$(this))
true;
}
catch(e){return;}
_$(this).emit(signalName, evt);
}
}
wtWidget.prototype.isAncestorOf = function(widget)
{
var curNode = $_(widget).parentNode;
while(curNode)
{
if (curNode == $_(this))
return true;
curNode = curNode.parentNode;
}
return false;
}
wtWidget.prototype.getStyle = function(name)
{
return this.get("style")[name];
}
wtWidget.prototype.setStyle = function(name, value)
{
this.get("style")[name] = value;
}
var wtShadowWidget = function(_parent)
{
if (arguments.length < 1)
return;
this.base = wtWidget;
this.base(_parent, "table");
var _shadowSize = 10;
if (arguments.length > 1)
_shadowSize = arguments[1];
if (_shadowSize > 10 || _shadowSize < 0)
_shadowSize = 10;
$_(this).className += " wtShadowWidget";
$_(this).cellPadding = $_(this).border = 0;
$_(this).cellSpacing = 0;
var _tbody = new wtWidget(this, "tbody");
var _row1 = new wtWidget(_tbody, "tr");
var _row2 = new wtWidget(_tbody, "tr");
var _contentCell = new wtWidget(_row1, "td");
$_(this).contentCell = _contentCell;
var _rightShadow = new wtWidget(_row1, "td");
$_(_rightShadow).style.width = _shadowSize + "px";
var _bottomShadow = new wtWidget(_row2, "td");
$_(_bottomShadow).style.height = _shadowSize + "px";
var _cornerShadow = new wtWidget(_row2, "td");
$_(_cornerShadow).style.width = $_(_cornerShadow).style.height = _shadowSize + "px";
if (isMSIE())
{
$_(_cornerShadow).style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/CornerShadow.png',sizingMethod='scale')";
var rl = new wtWidget(_bottomShadow, "table");
$_(rl).width = "100%";
$_(rl).height = "100%";
$_(rl).border = 0;
$_(rl).cellSpacing = $_(rl).cellPadding = 0;
var rbody = new wtWidget(rl, "tbody");
var rr = new wtWidget(rbody, "tr");
var rspace = new wtWidget(rr, "td");
var spacer = new wtImage(rspace, "images/1ptrans.gif");
$_(spacer).height = $_(spacer).width = parseInt(_shadowSize/2) + "px";
var rshadow = new wtWidget(rr, "td");
$_(rshadow).style.width = "100%";
$_(rshadow).style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/BottomShadow.png',sizingMethod='scale')";
var cl = new wtWidget(_rightShadow, "table");
$_(cl).style.position = "absolute";
$_(cl).width = $_(cl).height = "100%";
$_(cl).border = $_(cl).cellSpacing = $_(cl).cellPadding = 0;
var cbody = new wtWidget(cl, "tbody");
$_(cbody).height = "100%";
var cr = new wtWidget(cbody, "tr");
var cspace = new wtWidget(cr, "td");
var csr = new wtWidget(cbody, "tr");
var cshadow = new wtWidget(csr, "td");
$_(cshadow).style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/RightShadow.png',sizingMethod='scale')";
$_(cshadow).width = "100%";
$_(cshadow).height = "100%";
if (isMSIE() && window.shadowPollHack == undefined)
{
window.shadowMap = {};
window.shadowPollHack = function()
{
for(var i in shadowMap)
{
var cl = shadowMap[i];
if (! $_(cl))
{
delete shadowMap[i];
continue;
}
if ($_(cl).offsetParent
&& $_(cl).offsetWidth > 0
&& $_(cl).offsetHeight != ($_(cl).offsetParent.clientHeight -1)
&& $_(cl).offsetParent.clientHeight)
$_(cl).style.height = ($_(cl).offsetParent.clientHeight -1) + "px";
}
}
setInterval(shadowPollHack, 500);
}
if (isMSIE())
shadowMap[cl.toString()] = cl;
}
else
{
if (_shadowSize > 5)
{
$_(_cornerShadow).style.backgroundImage = "url('images/CornerShadow.png')";
$_(_rightShadow).style.backgroundImage = "url('images/RightShadow.png')";
$_(_bottomShadow).style.backgroundImage = "url('images/BottomShadow.png')";
}
else
{
$_(_cornerShadow).style.backgroundImage = "url('images/CornerShadowS.png')";
$_(_rightShadow).style.backgroundImage = "url('images/RightShadowS.png')";
$_(_bottomShadow).style.backgroundImage = "url('images/BottomShadowS.png')";
}
$_(_rightShadow).style.backgroundPosition = "0px " + parseInt(_shadowSize/2) + "px";
$_(_rightShadow).style.backgroundRepeat = "no-repeat";
$_(_bottomShadow).style.backgroundPosition = parseInt(_shadowSize/2) + "px 0px";
$_(_bottomShadow).style.backgroundRepeat = "no-repeat";
}
}
wtShadowWidget.prototype = new wtWidget;
wtShadowWidget.prototype.addWidget = function(widget)
{
if (!$_(this).contentCell)
$_(this).appendChild($_(widget));
else
return $_(this).contentCell.addWidget(widget);
}
var wtImage = function(_parent, _url)
{
if (arguments.length < 2)
return;
this.base = wtWidget;
this.base(_parent, "img");
if (isMSIE())
$_(this).style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=100)";
$_(this).border = 0;
$_(this).className += " wtImage";
this.setSelectable(false);
if (isMSIE() && _url.search(new RegExp("\\.png(\\?.*)?$", "i")) != -1)
{
$_(this).transformed = false;
var alias = this;
var onloadhandler = function()
{
if (this.transformed)
return;
var transform = function()
{
if (!$_(alias))
return;
$_(alias).transformed = true;
if ((!alias.get("style").width) && (!alias.get("style").height))
{
$_(alias).style.width = $_(alias).offsetWidth+"px";
$_(alias).style.height = $_(alias).offsetHeight+"px";
}
$_(alias).src = "images/1ptrans.gif";
var newfilter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + _url + "',sizingMethod='scale')";
$_(alias).style.filter = newfilter;
}
setTimeout(transform, 0);
}
$_(this).onload = onloadhandler;
$_(this).src = _url;
}
else
$_(this).src = _url;
}
wtImage.prototype = new wtWidget
var wtView = function(_parent, _width, _height)
{
if (arguments.length < 3)
return;
this.base = wtWidget;
this.base(_parent, "div");
this.setSize(_width, _height);
$_(this).className += " wtView";
$_(this).style.overflow = "auto";
$_(this).align = "center";
}
wtView.prototype = new wtWidget;
wtView.prototype.setBorder = function(color)
{
$_(this).style.border = "solid 1px " + color;
}
wtView.prototype.unsetBorder = function()
{
$_(this).style.border = "none";
}
var wtWindow = function(_parent, _width, _height)
{
if (arguments.length < 3)
return;
this.base = wtShadowWidget;
this.base(_parent);
$_(this).className += " wtWindow";
$_(this).modal = false;
$_(this).style.position = "absolute";
var _winbox = new wtWidget(this, "table");
$_(this).windowBox = _winbox;
$_($_(this).windowBox).className += " WindowBackground";
$_($_(this).windowBox).cellSpacing = 1;
$_($_(this).windowBox).border = 0;
var _tb = new wtWidget(_winbox, "tbody");
var _titleRow = new wtWidget(_tb, "tr");
var _contentRow = new wtWidget(_tb, "tr");
var tc = new wtWidget(_titleRow, "td");
var titleLayout = new wtRowLayout(tc, "100%");
var _titleCell = titleLayout.addWidget("");
$_(_titleCell).className += " WindowTitle";
_titleCell.setSelectable(false);
$_(this).titleCell = _titleCell;
_titleCell.setSize("100%", "");
var _contentCell = new wtWidget(_contentRow, "td");
$_(this).contentCell = _contentCell;
var _contentBlock = new wtView(_contentCell, _width, _height);
$_(_contentCell).className += " WindowContent";
_contentCell.set("colSpan", 2);
$_(this).contentBlock = _contentBlock;
this.setSlot("Close", this.closeSlot);
var closeCell = titleLayout.addWidget("X");
this.set("closeCell", closeCell);
closeCell.set("align", "right");
$_(closeCell).className += " WindowClose";
closeCell.connect("close_window", "Click", this, "Close");
closeCell.setDisplay(false);
var _coverBlock = new wtImage(document.body, "images/WindowCover.png");
$_(_coverBlock).wtDependency = this.toString();
$_(this).coverBlock = _coverBlock;
_coverBlock.setAbsolutePosition(500, 500);
$_(_coverBlock).style.display = "none";
var _randint = parseInt(Math.random() * 100000);
$_(this).titleCell.connect("window_set_dragging", "MouseDown", this, "SetDragging");
var activeCoverBlockSlot = function(myself, evt, source)
{
myself.emit("Click", evt);
}
this.setSlot("ActivateCover", activeCoverBlockSlot);
_coverBlock.connect("activate_cover", "Click", this, "ActivateCover");
this.setSize(_width, _height);
}
wtWindow.prototype = new wtShadowWidget;
wtWindow.prototype.closeSlot = function(myself, evt, source)
{
myself.removeSelf();
}
wtWindow.prototype._wtWidget_setLevel = wtWidget.prototype.setLevel;
wtWindow.prototype.setTitle = function(title)
{
$_(this).titleCell.clearAll();
$_(this).titleCell.addWidget(title);
}
wtWindow.prototype.setDraggable = function(yes)
{
if (yes)
$_(this).titleCell.connect("window_set_dragging", "MouseDown", _$(this), "SetDragging");
else
$_(this).titleCell.disconnect("window_set_dragging", "MouseDown");
}
wtWindow.prototype._wtShadowWidget_addWidget = wtShadowWidget.prototype.addWidget;
wtWindow.prototype.addWidget = function(widget)
{
if (!$_(this).contentBlock)
this._wtShadowWidget_addWidget(widget);
else
return $_(this).contentBlock.addWidget(widget);
}
wtWindow.prototype._wtShadowWidget_setSize = wtShadowWidget.prototype.setSize;
wtWindow.prototype.setSize = function(_width, _height)
{
this._wtShadowWidget_setSize(_width + 11, "");
$_(this).contentBlock.setSize(_width, _height);
}
wtWindow.prototype.setEnabled = function(yes)
{
$_(this).wtDisabled = !yes;
if (yes)
{
$_($_(this).coverBlock).style.display = "none";
this.setAlpha(1.0);
if (isMSIE())
{
var selectBoxes = $_(this).getElementsByTagName("select");
for (var i=0;i<selectBoxes.length;i++)
selectBoxes[i].style.visibility = "";
}
}
else
{
$_($_(this).coverBlock).style.display = "";
$_($_(this).coverBlock).parentNode.removeChild($_($_(this).coverBlock));
$_(this).parentNode.appendChild($_($_(this).coverBlock));
var _coverBlock = $_(this).coverBlock;
_coverBlock.setLevel(parseInt($_(this).style.zIndex) + 1);
var windowCoordinate = this.getAbsolutePosition();
_coverBlock.setAbsolutePosition(windowCoordinate.x, windowCoordinate.y);
_coverBlock.setSize($_($_(this).windowBox).offsetWidth, $_($_(this).windowBox).offsetHeight);
this.setAlpha(0.5);
if (isMSIE())
{
var selectBoxes = $_(this).getElementsByTagName("select");
for (var i=0;i<selectBoxes.length;i++)
selectBoxes[i].style.visibility = "hidden";
}
}
}
wtWindow.prototype.isEnabled = function()
{
return !(this.wtDisabled);
}
wtWindow.prototype.setLevel = function(nL)
{
this._wtWidget_setLevel(nL);
if ($_(this).coverBlock)
$_(this).coverBlock.setLevel(nL+1);
}
wtWindow.prototype.setModal = function(yes)
{
$_(this).modal = yes ? true : false;
}
wtWindow.prototype.clearAll = function()
{
var newContentBlock = new wtView(this.get("contentCell"), this.get("contentBlock").get("offsetWidth"),
this.get("contentBlock").get("offsetHeight"));
this.get("contentBlock").removeSelf();
this.set("contentBlock", newContentBlock);
}
wtWindow.prototype.center = function()
{
var cd = getClientDimensions();
var p_x = (cd.width - this.offsetWidth)/2;
var p_y = (cd.height - this.offsetHeight)/2;
if (p_x < 0) p_x = 0;
if (p_y < 0) p_y = 0;
this.setAbsolutePosition(p_x, p_y);
}
wtWindow.prototype.ucenter = function()
{
var cd = getClientDimensions();
var p_x = (cd.width - $_(this).offsetWidth)/2;
var p_y = (cd.height - $_(this).offsetHeight)/3;
if (p_x < 0) p_x = 0;
if (p_y < 0) p_y = 0;
this.setAbsolutePosition(p_x, p_y);
}
wtWindow.prototype._wtShadowWidget_removeSelf = wtShadowWidget.prototype.removeSelf;
wtWindow.prototype.removeSelf = function()
{
if (this.get("windowManager"))
{
_$($_(this.get("windowManager"))).removeWindow(this);
return;
}
this._wtShadowWidget_removeSelf();
}
wtWindow.prototype.enableCloseIcon = function(yes)
{
this.get("closeCell").setDisplay(yes);
}
var wtModalWindow = function(parentWidget, width, height)
{
if (arguments.length < 3)
return;
var p = {"x":0, "y":0};
if (!isDOMNode(parentWidget))
{
if ($_(parentWidget).windowList && $_(parentWidget).windowList.prevNode.data)
{
p = $_(parentWidget).windowList.prevNode.data.getAbsolutePosition();
p.x -= 10;
p.y -= 10;
}
}
this.base = wtWindow;
this.base(parentWidget, width, height);
this.setModal(true);
this.setAbsolutePosition(p.x, p.y);
}
wtModalWindow.prototype = new wtWindow;
var wtButton = function(_parent, _child)
{
if (arguments.length < 2)
return;
this.base = wtWidget;
this.base(_parent, "table");
$_(this).cellSpacing = $_(this).border = $_(this).cellPadding = 0;
$_(this).className += " wtButton";
var _tbody = new wtWidget(this, "tbody");
var _tr = new wtWidget(_tbody, "tr");
var _leftCell = new wtWidget(_tr, "td");
var _centerCell = new wtWidget(_tr, "td");
$_(_centerCell).className += " wtButton";
var _rightCell = new wtWidget(_tr, "td");
$_(_leftCell).style.width = $_(_rightCell).style.width = "15px";
$_(_leftCell).style.height = $_(_rightCell).style.height = $_(_centerCell).style.height = "20px";
$_(_centerCell).style.overflow = "hidden";
if (!isMSIE())
{
$_(_leftCell).style.backgroundImage = "url(images/ButtonInactiveLeft.png)";
$_(_centerCell).style.backgroundImage = "url(images/ButtonInactiveCenter.png)";
$_(_centerCell).style.backgroundRepeat = "repeat-x";
$_(_rightCell).style.backgroundImage = "url(images/ButtonInactiveRight.png)";
var _activate = function(widget, evt)
{
if ($_(widget).wtDisabled) return;
$_($_(widget).leftCell).style.backgroundImage = "url(images/ButtonActiveLeft.png)";
$_($_(widget).centerCell).style.backgroundImage = "url(images/ButtonActiveCenter.png)";
$_($_(widget).rightCell).style.backgroundImage = "url(images/ButtonActiveRight.png)";
}
var _deactivate = function(widget, evt)
{
if ($_(widget).wtDisabled) return;
$_($_(widget).leftCell).style.backgroundImage = "url(images/ButtonInactiveLeft.png)";
$_($_(widget).centerCell).style.backgroundImage = "url(images/ButtonInactiveCenter.png)";
$_($_(widget).rightCell).style.backgroundImage = "url(images/ButtonInactiveRight.png)";
}
this.setSlot("Activate", _activate);
this.setSlot("Deactivate", _deactivate);
this.connect("button_activate", "MouseOver", this, "Activate");
this.connect("button_deactivate", "MouseOut", this, "Deactivate");
}
else
{
$_(_leftCell).style.filter +=
" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ButtonInactiveLeft.png',sizingMethod='scale')";
$_(_centerCell).style.filter +=
" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ButtonInactiveCenter.png',sizingMethod='scale')";
$_(_centerCell).style.backgroundRepeat = "repeat-x";
$_(_rightCell).style.filter +=
" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ButtonInactiveRight.png',sizingMethod='scale')";
var _deactivate = function(widget, evt)
{
if ($_(widget).wtDisabled) return;
$_($_(widget).leftCell).filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = "images/ButtonInactiveLeft.png";
$_($_(widget).centerCell).filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = "images/ButtonInactiveCenter.png";
$_($_(widget).rightCell).filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = "images/ButtonInactiveRight.png";
}
var _activate = function(widget, evt)
{
if ($_(widget).wtDisabled) return;
$_($_(widget).leftCell).filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = "images/ButtonActiveLeft.png";
$_($_(widget).centerCell).filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = "images/ButtonActiveCenter.png";
$_($_(widget).rightCell).filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = "images/ButtonActiveRight.png";
}
this.setSlot("Activate", _activate);
this.setSlot("Deactivate", _deactivate);
this.connect("button_activate", "MouseOver", this, "Activate");
this.connect("button_deactivate", "MouseOut", this, "Deactivate");
}
var _mousedown = function(widget, evt)
{
if ($_(widget).wtDisabled) return;
if (!isMSIE())
$_($_(widget).centerCell).style.padding = "2px 0px 0px 0px";
$_(widget).focus();
}
var _mouseup = function(widget, evt)
{
if ($_(widget).wtDisabled) return;
$_($_(widget).centerCell).style.padding = "0px 0px 0px 0px";
}
this.setSlot("Pressing", _mousedown);
this.setSlot("Pressed", _mouseup);
$_(this).mouseId = parseInt(Math.random() * 100000);
this.connect("button_pressing", "MouseDown", this, "Pressing");
this.connect("button_pressed", "MouseUp", this, "Pressed");
$_(this).leftCell = _leftCell;
$_(this).centerCell = _centerCell;
$_(this).rightCell = _rightCell;
$_(this).wtDisabled = false;
this.setContent(_child);
this.setSelectable(false);
}
wtButton.prototype = new wtWidget;
wtButton.prototype.setContent = function(_child)
{
$_(this).centerCell.clearAll();
$_(this).centerCell.addWidget(_child);
}
wtButton.prototype.setHandler = function(handler)
{
this.setSlot("ClickHandler", handler);
this.connect("button_click", "Click", this, "ClickHandler");
}
wtButton.prototype.resetHandler = function()
{
this.disconnect("button_click", "Click");
}
wtButton.prototype._wtWidget_addWidget = wtWidget.prototype.addWidget;
wtButton.prototype.addWidget = function(_widget)
{
if (! $_(this).centerCell)
this._wtWidget_addWidget(_widget);
else
return $_(this).centerCell.addWidget(_widget);
}
wtButton.prototype.setEnabled = function(yes)
{
$_(this).wtDisabled = !yes;
if (yes)
{
this.linkSignal("Click", "onclick");
this.setAlpha(1.0);
}
else
{
$_(this).removeAttribute("onclick");
this.setAlpha(0.5);
}
}
wtButton.prototype.isEnabled = function()
{
return !(this.wtDisabled);
}
var wtAnchor = function(_parent, _desc)
{
if (arguments.length < 2)
return;
this.base = wtWidget;
this.base(_parent, "a");
$_(this).className += " wtAnchor AnchorInactive";
this.addWidget(_desc);
$_(this).removeAttribute("href");
var activateSlot = function(widget, evt, source)
{
if ($_(widget).wtDisabled) return;
$_(widget).className = $_(widget).className.replace(new RegExp("Anchor[a-zA-z0-9]+"), "AnchorActive");
}
var deactivateSlot = function(widget, evt, source)
{
if ($_(widget).wtDisabled) return;
$_(widget).className = $_(widget).className.replace(new RegExp("Anchor[a-zA-z0-9]+"), "AnchorInactive");
}
var selectSlot = function(widget, evt, source)
{
$_(widget).className = $_(widget).className.replace(new RegExp("Anchor[a-zA-z0-9]+"), "AnchorSelected");
}
this.setSlot("Activate", activateSlot);
this.setSlot("Deactivate", deactivateSlot);
this.setSlot("Select", selectSlot);
this.setSlot("Unselect", deactivateSlot);
this.setSelected(false);
}
wtAnchor.prototype = new wtWidget;
wtAnchor.prototype.setSelected = function(yes)
{
if (yes)
{
this.disconnect("anchor_activate", "MouseOver");
this.disconnect("anchor_deactivate", "MouseOut");
$_(this).wtSlots.Select(this, null);
}
else
{
this.connect("anchor_activate", "MouseOver", this, "Activate");
this.connect("anchor_deactivate", "MouseOut", this, "Deactivate");
$_(this).wtSlots.Unselect(this, null);
}
}
wtAnchor.prototype.setHref = function(href)
{
this.resetHandler();
var before = $_(this).innerHTML;
$_(this).href = href;
$_(this).innerHTML = before;
}
wtAnchor.prototype.resetHref = function()
{
$_(this).removeAttribute("href");
}
wtAnchor.prototype.setHandler = function(handler)
{
this.resetHref();
this.setSlot("ClickHandler", handler);
this.connect("anchor_click", "Click", this, "ClickHandler");
}
wtAnchor.prototype.resetHandler = function()
{
this.removeSlot("ClickHandler");
this.disconnect("anchor_click", "Click");
}
wtAnchor.prototype.setEnabled = function(yes)
{
$_(this).wtDisabled = !yes;
if (yes)
{
this.linkSignal("Click", "onclick");
if ($_(this).href == undefined && $_(this).hrefCopy != undefined)
$_(this).href = $_(this).hrefCopy;
this.setAlpha(1.0);
}
else
{
$_(this).removeAttribute("onclick");
$_(this).hrefCopy = $_(this).href;
$_(this).removeAttribute("href");
this.setAlpha(0.5);
}
}
wtAnchor.prototype.isEnabled = function()
{
return !($_(this).wtDisabled);
}
var wtSpacer = function(_parent, _width, _height)
{
if (arguments.length < 3)
return;
this.base = wtWidget;
this.base(_parent, "img");
$_(this).src = "images/1ptrans.gif";
$_(this).style.width = dimension(_width);
$_(this).style.height = dimension(_height);
this.setSelectable(false);
$_(this).style.display = "inline";
}
wtSpacer.prototype = new wtWidget;
var wtBlockSpacer = function(_parent, _width, _height)
{
if (arguments.length < 3)
return;
this.base = wtSpacer;
this.base(_parent, _width, _height);
$_(this).style.display = "block";
}
wtBlockSpacer.prototype = new wtSpacer;
var wtRowLayout = function(_parent, _size)
{
if (arguments.length < 2)
return;
this.base = wtWidget;
this.base(_parent, "table");
$_(this).border = $_(this).cellSpacing = $_(this).cellPadding = 0;
$_(this).className += " wtRowLayout";
$_(this).style.width = dimension(_size);
$_(this).contentRow = new wtWidget(new wtWidget(this, "tbody"), "tr");
if (!isMSIE())
$_(this).cells = $_($_(this).contentRow).cells;
}
wtRowLayout.prototype = new wtWidget;
wtRowLayout.prototype._wtWidget_addWidget = wtWidget.prototype.addWidget;
wtRowLayout.prototype.addWidget = function(widget)
{
if (!$_(this).contentRow)
{
this._wtWidget_addWidget(widget);
return;
}
var newCell = new wtWidget($_(this).contentRow, "td");
newCell.addWidget(widget);
return newCell;
}
wtRowLayout.prototype.addSpacer = function(_width)
{
var cell = new wtWidget($_(this).contentRow, "td");
$_(cell).className += " wtRowSpacerCell";
$_(cell).style.width = dimension(_width);
var img = new wtImage(cell, "images/1ptrans.gif");
img.setSize(_width, "1px");
return cell;
}
var wtColumnLayout = function(_parent, _width)
{
if (arguments.length < 2)
return;
this.base = wtWidget;
this.base(_parent, "table");
$_(this).border = $_(this).cellSpacing = $_(this).cellPadding = 0;
$_(this).className += " wtColumnLayout";
$_(this).style.width = dimension(_width);
if (arguments.length > 2)
$_(this).style.height = arguments[2] + (isInteger(arguments[2]) ? "px" : "");
$_(this).tbody = new wtWidget(this, "tbody");
}
wtColumnLayout.prototype = new wtWidget;
wtColumnLayout.prototype._wtWidget_addWidget = wtWidget.prototype.addWidget;
wtColumnLayout.prototype.addWidget = function(widget)
{
if (!$_(this).tbody)
{
this._wtWidget_addWidget(widget);
return;
}
var newRow = new wtWidget($_(this).tbody, "tr");
var newCell = new wtWidget(newRow, "td");
newCell.addWidget(widget);
return newCell;
}
wtColumnLayout.prototype.addSpacer = function(_height)
{
var c = new wtSpacer(this, 1, _height);
$_(c).style.height = _height;
return c;
}
var wtDisplayCell = function(_widget, _value)
{
if (arguments.length < 1)
return;
this.base = wtWidget;
this.base(null, "td");
if (isNumber(_widget))
this.addWidget(String(_widget));
else
this.addWidget(_widget);
if (_value)
$_(this).cellValue = _value;
$_(this).className += " wtDisplayCell";
}
wtDisplayCell.prototype = new wtWidget;
wtDisplayCell.prototype.setContent = function(widget)
{
this.clearAll();
if (isString(widget) || isNumber(widget))
$_(this).cellValue = widget;
this.addWidget(widget);
}
wtDisplayCell.prototype.setValue = function(value)
{
$_(this).cellValue = value;
}
wtDisplayCell.prototype.colIndex = function()
{
if (! $_(this).parentNode) return null;
for(var i=0;i<$_(this).parentNode.cells.length;i++)
if ($_(this).parentNode.cells.item(i) == $_(this)) return i;
return null;
}
var wtDisplayRow = function(_parent)
{
if (arguments.length < 1)
return;
this.base = wtWidget;
this.base(_parent, "tr");
$_(this).dataColumn = 0;
}
wtDisplayRow.prototype = new wtWidget;
wtDisplayRow.prototype.getValue = function()
{
return $_(this).cells.item($_(this).dataColumn).cellValue;
}
wtDisplayRow.prototype.getValueList = function()
{
var retval = [];
for(var i=0;i<$_(this).cells.length;i++)
retval.push($_(this).cells.item(i).cellValue);
return retval;
}
wtDisplayRow.prototype.setDataColumn = function(idx)
{
$_(this).dataColumn = idx;
}
wtDisplayRow.prototype.addWidgetList = function(widgetList)
{
var retval = [];
for(var i=0;i<widgetList.length;i++)
retval.push(this.addWidget(widgetList[i]));
return retval;
}
wtDisplayRow.prototype._wtWidget_addWidget = wtWidget.prototype.addWidget;
wtDisplayRow.prototype.addWidget = function(widget)
{
var cell;
this._wtWidget_addWidget(cell = new wtDisplayCell(widget));
if (isString(widget) || isNumber(widget))
cell.setValue(widget);
return cell;
}
var wtDisplay = function(_parent, _width)
{
if (arguments.length < 2)
return;
this.base = wtWidget;
this.base(_parent, "table");
$_(this).style.width = dimension(_width);
$_(this).thead = new wtWidget(this, "tbody");
$_(this).thead.setDisplay(false);
$_(this).tshead = new wtWidget(this, "tbody");
$_(this).tshead.setDisplay(false);
$_(this).tbody = new wtWidget(this, "tbody");
$_(this).tstatus = new wtWidget(this, "tbody");
$_(this).tstatus.setDisplay(false);
$_(this).className += " wtDisplay";
$_(this).border = $_(this).cellPadding = 0;
$_(this).cellSpacing = 1;
$_(this).arrow = null;
$_(this).sortCell = null;
var sortSlot = function(target, evt, source)
{
if ($_(target).colList == undefined) return;
var colIndex = source.colIndex();
if (colIndex >= $_(target).colList.length) return;
var sortFactor = $_(target).colList[colIndex];
if (sortFactor == 0) return;
var defaultSortFunc = function(a, b)
{
if (a.getValue() < b.getValue()) return -1 * sortFactor;
if (a.getValue() == b.getValue()) return 0;
return sortFactor;
}
var rowArray = [];
for(var i=0;i<$_($_(target).tbody).rows.length;i++)
{
rowArray.push(_$($_($_(target).tbody).rows.item(i)));
rowArray[i].setDataColumn(colIndex);
}
rowArray.sort(defaultSortFunc);
$_(target).tbody.clearAll();
while(rowArray.length)
target.addWidget(rowArray.shift());
if ($_(target).arrow)
{
$_(target).arrow.removeSelf();
$_(target).arrow = null;
}
if ($_(target).colList[colIndex] > 0)
$_(target).arrow = new wtImage(null, "images/UpArrow.png");
else
$_(target).arrow = new wtImage(null, "images/DownArrow.png");
source.addWidget($_(target).arrow);
$_(target).arrow.setRelativePosition(0,-5);
$_(target).colList[colIndex] *= -1;
for(var i = 0; i<$_(target).colList.length;i++)
if (i!=colIndex) $_(target).colList[i] = Math.abs($_(target).colList[i]);
if ($_(target).sortCell)
$_($_(target).sortCell).className = $_($_(target).sortCell).className.replace("DisplaySubtitleSorted", "DisplaySubtitleInactive");
$_(target).sortCell = source;
$_($_(target).sortCell).className =
$_($_(target).sortCell).className.replace(new RegExp("(DisplaySubtitleInactive|DisplaySubtitleActive)"), "DisplaySubtitleSorted");
target.emit("Sort", {"colIndex" : colIndex, "order" : $_(target).colList[colIndex] * -1});
}
this.setSlot("Sort", sortSlot);
var activateColumnSlot = function(target, evt, source)
{
if ($_(target).colList == undefined) return;
var colIndex = source.colIndex();
if (colIndex >= $_(target).colList.length) return;
if ($_(target).colList[colIndex] == 0) return;
$_(source).className = $_(source).className.replace("DisplaySubtitleInactive", "DisplaySubtitleActive");
}
this.setSlot("ActivateColumn", activateColumnSlot);
var deactivateColumnSlot = function(target, evt, source)
{
if ($_(target).colList == undefined) return;
var colIndex = source.colIndex();
if (colIndex >= $_(target).colList.length) return;
if ($_(target).colList[colIndex] == 0) return;
$_(source).className = $_(source).className.replace("DisplaySubtitleActive", "DisplaySubtitleInactive");
}
this.setSlot("DeactivateColumn", deactivateColumnSlot);
this.setSignal("Sort");
}
wtDisplay.prototype = new wtWidget;
wtDisplay.prototype._wtWidget_addWidget = wtWidget.prototype.addWidget;
wtDisplay.prototype.addWidget = function(widget)
{
if (!$_(this).tbody || !$_(this).wtSignals.Sort)
this._wtWidget_addWidget(widget);
else
return $_(this).tbody.addWidget(widget);
}
wtDisplay.prototype.setTitle = function(title)
{
this.unsetTitle();
var tcell = new wtWidget(new wtWidget($_(this).thead, "tr"), "td");
tcell.addWidget(title);
$_(tcell).className += " DisplayTitle";
$_(tcell).colSpan = 40;
tcell.setSelectable(false);
$_(this).thead.setDisplay(true);
}
wtDisplay.prototype.unsetTitle = function()
{
$_(this).thead.clearAll();
$_(this).thead.setDisplay(false);
}
wtDisplay.prototype.setSimpleRow = function(label, widget)
{
var retval = new wtWidget(this, "tr");
var captionCell = new wtWidget(retval, "td");
captionCell.addWidget(label);
$_(captionCell).className += " DisplayCaption";
captionCell.setSelectable(false);
var contentCell = new wtDisplayCell(widget);
if (isString(widget) || isNumber(widget))
contentCell.setValue(widget);
retval.addWidget(contentCell);
$_(contentCell).className += " DisplayContent";
$_(retval).captionCell = captionCell;
$_(retval).contentCell = contentCell;
retval.addWidget = function(widget){return $_(retval).contentCell.addWidget(widget);}
return retval;
}
wtDisplay.prototype.setDisplayRow = function(displayrow)
{
var retval = new wtDisplayRow(this);
for(var i=0;i<displayrow.length;i++)
{
var cell = retval.addWidget(displayrow[i]);
$_(cell).className += " DisplayContent";
}
return retval;
}
wtDisplay.prototype.delDisplayRow = function(rowIdx)
{
_$($_(this).tbody.rows.item(rowIdx)).removeSelf();
}
wtDisplay.prototype.setSubtitleRow = function(displayrow)
{
var retval = new wtDisplayRow($_(this).tshead);
$_(this).colList = [];
for(var i=0;i<displayrow.length;i++)
{
var cell = retval.addWidget(displayrow[i]);
$_(cell).className += " DisplaySubtitleInactive";
$_(this).colList.push(1);
cell.connect("sort", "Click", this, "Sort");
cell.connect("activate", "MouseOver", this, "ActivateColumn");
cell.connect("deactivate", "MouseOut", this, "DeactivateColumn");
}
retval.setSelectable(false);
$_(this).tshead.setDisplay(true);
return retval;
}
wtDisplay.prototype.unsetSubtitleRow = function()
{
$_(this).tshead.clearAll();
$_(this).tshead.setDisplay(false);
}
wtDisplay.prototype.setStatusRow = function(widget)
{
$_(this).tstatus.clearAll();
var retval = new wtDisplayRow($_(this).tstatus);
var cell = retval.addWidget(widget);
$_(cell).className += " DisplayStatus";
$_(cell).colSpan = 50;
$_(this).tstatus.setDisplay(true);
return retval;
}
wtDisplay.prototype.unsetStatusRow = function()
{
$_(this).tstatus.clearAll();
$_(this).tstatus.setDisplay(false);
}
wtDisplay.prototype.setSortEnabled = function(colList)
{
$_(this).colList = colList;
}
wtDisplay.prototype.sort = function(colIndex)
{
$_(this).wtSlots.Sort(this, null, _$($_($_(this).tshead).rows.item(0).cells.item(colIndex)));
}
wtDisplay.prototype.getValueArray = function()
{
var retval = [];
for(var i=0;i<$_($_(this).tbody).rows.length;i++)
retval.push(_$($_($_(this).tbody).rows.item(i)).getValueList());
return retval;
}
POPUP_LEFT = 0;
POPUP_RIGHT = 1;
POPUP_TOP = 2;
POPUP_BOTTOM = 3;
window.currentMenu = null;
var wtPopupMenu = function(parentWidget, popmode)
{
if (arguments.length < 1)
return;
this.base = wtShadowWidget;
this.base(document.body, 5);
$_(this).wtDependency = parentWidget.toString();
$_(this).table = new wtWidget(this, "table");
$_($_(this).table).cellPadding = $_($_(this).table).border = 0;
$_($_(this).table).cellSpacing = 1;
$_(this).tbody = new wtWidget($_(this).table, "tbody");
$_($_(this).table).className += " wtPopupMenu";
$_(this).popMode = (popmode != undefined ? popmode : POPUP_BOTTOM);
$_(this).parentWidget = parentWidget;
$_(this).currentAlpha = 0.0;
this.setDisplay(false);
this.setLevel(50000);
this.setAlpha(0.0);
this.setSignal("PopUp");
this.setSignal("PopOut");
var popUpSlot = function(myself, evt, source)
{
myself.popUp();
}
this.setSlot("PopUp", popUpSlot);
var checkCursorSlot = function(myself, evt, source)
{
var popOutFunc = function(){if ($_(myself)) myself.popOut();}
window.popOutTimer = setTimeout(popOutFunc, 600);
}
this.setSlot("CheckCursor", checkCursorSlot);
var cancelTimeoutSlot = function(myself, evt, source)
{
if (window.popOutTimer != undefined)
{
clearTimeout(window.popOutTimer);
window.popOutTimer = undefined;
}
}
this.setSlot("CancelTimeout", cancelTimeoutSlot);
var closePopUpSlot = function(myself, evt, source)
{
if (currentMenu)
{
if (currentMenu == this)
return;
if (window.popOutTimer != undefined)
{
clearTimeout(window.popOutTimer);
window.popOutTimer = undefined;
}
if (window.fadeInTimer != undefined)
{
clearTimeout(window.fadeInTimer);
window.fadeInTimer = undefined;
}
currentMenu.popOut();
}
}
this.setSlot("ClosePopUp", closePopUpSlot);
parentWidget.connect("menu_popup", "MouseOver", this, "PopUp");
parentWidget.connect("menu_check_cursor", "MouseOut", this, "CheckCursor");
this.connect("menu_check_cursor", "MouseOut", this, "CheckCursor");
parentWidget.connect("menu_cancel_timeout", "MouseOver", this, "CancelTimeout");
this.connect("menu_cancel_timeout", "MouseOver", this, "CancelTimeout");
window.mouse.connect(this.toString(), "Click", this, "ClosePopUp");
}
wtPopupMenu.prototype = new wtShadowWidget;
wtPopupMenu.prototype._wtShadowWidget_addWidget = wtShadowWidget.prototype.addWidget;
wtPopupMenu.prototype.addWidget = function(widget, handler)
{
if (!$_(this).wtSlots.ClosePopUp)
{
this._wtShadowWidget_addWidget(widget);
return;
}
var row = new wtWidget($_(this).tbody, "tr");
var cell = new wtWidget(row, "td");
$_(cell).className += " PopupItemInactive";
cell.addWidget(widget);
if (handler)
{
cell.setSlot("ClickHandler", handler);
cell.connect("menuitem_click", "Click", cell, "ClickHandler");
}
var activate = function(myself, evt, source)
{
$_(myself).className = $_(myself).className.replace("PopupItemInactive", "PopupItemActive");
}
var deactivate = function(myself, evt, source)
{
$_(myself).className = $_(myself).className.replace("PopupItemActive", "PopupItemInactive");
}
cell.setSlot("Activate", activate);
cell.setSlot("Deactivate", deactivate);
cell.connect("menuitem_activate", "MouseOver", cell, "Activate");
cell.connect("menuitem_deactivate", "MouseOut", cell, "Deactivate");
return cell;
}
wtPopupMenu.prototype.addItems = function(widgetList, handlerList)
{
if (handlerList)
{
for(var i=0;i<widgetList.length;i++)
this.addWidget(widgetList[i], handlerList[i]);
}
else
{
for(var i=0;i<widgetList.length;i++)
this.addWidget(widgetList[i]);
}
}
wtPopupMenu.prototype.popUp = function(_x, _y)
{
if (currentMenu)
{
if (currentMenu == this)
return;
if (this.get("parentWidget").isAncestorOf(currentMenu.get("parentWidget")))
return;
if (window.popOutTimer != undefined)
{
clearTimeout(window.popOutTimer);
window.popOutTimer = undefined;
}
if (window.fadeInTimer != undefined)
{
clearTimeout(window.fadeInTimer);
window.fadeInTimer = undefined;
}
currentMenu.popOut();
}
currentMenu = this;
this.setDisplay(true);
var menu = this;
var fadeIn = function()
{
if ($_(menu).currentAlpha > 0.95)
{
window.fadeInTimer = undefined;
return;
}
$_(menu).currentAlpha += 0.1;
menu.setAlpha($_(menu).currentAlpha);
window.fadeInTimer = setTimeout(fadeIn, 30);
}
if (!isMSIE())
window.fadeInTimer = setTimeout(fadeIn, 30);
else
this.setAlpha(1);
if (_x != undefined && _y != undefined)
this.setAbsolutePosition(_x, _y);
else
{
var pt = this.getAttachCoordinate();
this.setAbsolutePosition(pt.x, pt.y);
}
this.emit("PopUp", {});
}
wtPopupMenu.prototype.popOut = function()
{
if (currentMenu && currentMenu != this)
currentMenu.popOut();
this.setDisplay(false);
$_(this).currentAlpha = 0.0;
this.setAlpha(0.0);
currentMenu = null;
if (window.popOutTimer)
{
clearTimeout(window.popOutTimer);
window.popOutTimer = undefined;
}
if (window.fadeInTimer)
{
clearTimeout(window.fadeInTimer);
window.fadeInTimer = undefined;
}
this.emit("PopOut", {});
}
wtPopupMenu.prototype.getAttachCoordinate = function()
{
var parentPos = $_(this).parentWidget.getScreenPosition();
if (isMSIE())
{
parentPos.x += document.documentElement.scrollLeft;
parentPos.y += document.documentElement.scrollTop;
}
else
{
parentPos.x += window.scrollX;
parentPos.y += window.scrollY;
}
var x, y;
if ($_(this).popMode == POPUP_LEFT)
{
x = parentPos.x - $_($_(this).table).offsetWidth;
y = parentPos.y;
}
else if ($_(this).popMode == POPUP_RIGHT)
{
x = parentPos.x + $_($_(this).parentWidget).offsetWidth;
y = parentPos.y;
}
else if ($_(this).popMode == POPUP_TOP)
{
x = parentPos.x;
y = parentPos.y - $_($_(this).table).offsetHeight;
}
else
{
x = parentPos.x;
y = parentPos.y + $_($_(this).parentWidget).offsetHeight;
}
return {"x":x, "y":y};
}
wtPopupMenu.prototype.setSize = function(width, height)
{
$_(this).table.setSize(width, height);
}
wtPopupMenu.prototype.addSeparator = function()
{
var row = new wtWidget($_(this).tbody, "tr");
}
var wtAttachedMenu = function(parent, popmode)
{
this.base = wtPopupMenu;
this.base(parent, popmode);
}
wtAttachedMenu.prototype = new wtPopupMenu;
var wtContextMenu = function(parentWidget, width)
{
if (arguments.length < 1)
return;
this.base = wtPopupMenu;
this.base(parentWidget);
this.set("wtDependency", parentWidget);
if (width)
this.setSize(width, "");
parentWidget.linkSignal("ContextMenu", "oncontextmenu");
parentWidget.set("oncontextmenu_raw", parentWidget.get("oncontextmenu"));
var contextHandler = function(evt)
{
this.oncontextmenu_raw(evt);
return false;
}
parentWidget.set("oncontextmenu", contextHandler);
var popUpSlot = function(myself, evt, source)
{
var scrollOffsetX, scrollOffsetY;
if (isMSIE())
{
scrollOffsetX = document.documentElement.scrollLeft;
scrollOffsetY = document.documentElement.scrollTop;
}
else
{
scrollOffsetX = window.scrollX;
scrollOffsetY = window.scrollY;
}
myself.popUp(mouse.x +scrollOffsetX -3, mouse.y +scrollOffsetY -3);
}
this.setSlot("PopUp", popUpSlot);
parentWidget.disconnect("menu_popup", "MouseOver");
parentWidget.disconnect("menu_check_cursor", "MouseOut");
parentWidget.disconnect("menu_cancel_timeout", "MouseOver");
parentWidget.connect("menu_popup", "ContextMenu", this, "PopUp");
}
wtContextMenu.prototype = new wtPopupMenu;
var wtNotebookPage = function(notebook, title)
{
if (arguments.length < 2)
return;
this.startProxy(this);
$_(this).notebook = notebook;
$_(this).wtDependency = notebook;
var tab = new wtRowLayout($_(notebook).tabLayout, "");
$_(this).wtDependency = tab.toString();
$_(this).tab = tab;
$_(tab).leftCell = tab.addWidget("");
$_(tab).centerCell = tab.addWidget("");
$_($_(tab).centerCell).className += " TabTitle";
$_(tab).rightCell = tab.addWidget("");
tab.setSelectable(false);
if (isMSIE())
{
$_($_(tab).leftCell).style.filter +=
" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/TabInactiveLeft.png',sizingMethod='scale')";
$_($_(tab).centerCell).style.filter +=
" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/TabInactiveCenter.png',sizingMethod='scale')";
$_($_(tab).rightCell).style.filter +=
" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/TabInactiveRight.png',sizingMethod='scale')";
}
else
{
$_($_(tab).leftCell).style.backgroundImage = "url(images/TabInactiveLeft.png)";
$_($_(tab).centerCell).style.backgroundImage = "url(images/TabInactiveCenter.png)";
$_($_(tab).rightCell).style.backgroundImage = "url(images/TabInactiveRight.png)";
}
$_(tab).leftCell.setSize(25, 28);
$_(tab).rightCell.setSize(25, 28);
$_(tab).centerCell.addWidget(title);
var contentBlock = new wtView($_(notebook).contentCell, "100%", "100%");
$_(this).contentBlock = contentBlock;
if ($_(notebook).parentNode == document.body)
$_(contentBlock).style.overflow = "";
contentBlock.setDisplay(false);
$_(contentBlock).className += " TabView";
$_(this).selected = false;
var activateSlot = function(myself, evt, source)
{
if ($_(myself).selected)
return;
if (navigator.userAgent.search("MSIE") != -1)
{
$_($_($_(myself).tab).leftCell).filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = "images/TabActiveLeft.png";
$_($_($_(myself).tab).centerCell).filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = "images/TabActiveCenter.png";
$_($_($_(myself).tab).rightCell).filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = "images/TabActiveRight.png";
}
else
{
$_($_($_(myself).tab).leftCell).style.backgroundImage = "url(images/TabActiveLeft.png)";
$_($_($_(myself).tab).centerCell).style.backgroundImage = "url(images/TabActiveCenter.png)";
$_($_($_(myself).tab).rightCell).style.backgroundImage = "url(images/TabActiveRight.png)";
}
}
this.setSlot("Activate", activateSlot);
var deactivateSlot = function(myself, evt, source)
{
if ($_(myself).selected)
return;
if (navigator.userAgent.search("MSIE") != -1)
{
$_($_($_(myself).tab).leftCell).filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = "images/TabInactiveLeft.png";
$_($_($_(myself).tab).centerCell).filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = "images/TabInactiveCenter.png";
$_($_($_(myself).tab).rightCell).filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = "images/TabInactiveRight.png";
}
else
{
$_($_($_(myself).tab).leftCell).style.backgroundImage = "url(images/TabInactiveLeft.png)";
$_($_($_(myself).tab).centerCell).style.backgroundImage = "url(images/TabInactiveCenter.png)";
$_($_($_(myself).tab).rightCell).style.backgroundImage = "url(images/TabInactiveRight.png)";
}
}
this.setSlot("Deactivate", deactivateSlot);
this.setSignal("Select");
this.setSignal("Deselect");
tab.connect("tab_activate", "MouseOver", this, "Activate");
tab.connect("tab_deactivate", "MouseOut", this, "Deactivate");
tab.connect("tab_select", "Click", notebook, "SelectTab");
}
wtNotebookPage.prototype = new wtObject;
wtNotebookPage.prototype.removeSelf = function()
{
var tab = $_(this).tab;
var contentBlock = $_(this).contentBlock;
tab.removeSelf();
contentBlock.removeSelf();
var tabList = $_($_(this).notebook).tabList;
for(var i=0;i<tabList.length;i++)
{
if (tabList[i] == this)
{
tabList.splice(i, 1);
break;
}
}
this.endProxy();
}
wtNotebookPage.prototype.addWidget = function(widget)
{
return $_(this).contentBlock.addWidget(widget);
}
wtNotebookPage.prototype.setTitle = function(title)
{
$_($_(this).tab).centerCell.clearAll();
$_($_(this).tab).centerCell.addWidget(widget);
}
wtNotebookPage.prototype.select = function()
{
var tab = $_(this).tab;
var leftCell = $_(tab).leftCell;
var centerCell = $_(tab).centerCell;
var rightCell = $_(tab).rightCell;
if (isMSIE())
{
$_(leftCell).filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = "images/TabSelectedLeft.png";
$_(centerCell).filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = "images/TabSelectedCenter.png";
$_(rightCell).filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = "images/TabSelectedRight.png";
}
else
{
$_(leftCell).style.backgroundImage = "url(images/TabSelectedLeft.png)";
$_(centerCell).style.backgroundImage = "url(images/TabSelectedCenter.png)";
$_(rightCell).style.backgroundImage = "url(images/TabSelectedRight.png)";
}
$_(this).selected = true;
$_(this).contentBlock.setDisplay(true);
this.emit("Select", {});
}
wtNotebookPage.prototype.deselect = function()
{
$_(this).selected = false;
$_(this).wtSlots.Deactivate(this);
$_(this).contentBlock.setDisplay(false);
this.emit("Deselect", {});
}
wtNotebookPage.prototype.clearAll = function()
{
$_(this).contentBlock.clearAll();
}
var wtNotebook = function(parent)
{
if (arguments.length < 1)
return;
this.base = wtWidget;
this.base(parent, "div");
$_(this).className += " wtNotebook";
$_(this).tabCell = new wtWidget(this, "div");
$_(this).tabLayout = new wtRowLayout($_(this).tabCell, "");
var separator = new wtWidget(this, "div");
$_(separator).style.backgroundColor = "#536baa";
separator.setSize("100%", 3);
$_(separator).style.margin = "0px 0px 0px 0px";
$_(separator).style.padding = "0px";
$_(separator).style.fontSize = "0";
$_(this).contentCell = new wtWidget(this, "div");
var contentCell = $_(this).contentCell;
$_(this).style.width = $_(this).style.height = "100%";
if (parent != document.body)
{
$_(contentCell).style.width = (parseInt($_(this).parentNode.offsetWidth) - 4) + "px";
$_(contentCell).style.height = (parseInt($_(this).parentNode.offsetHeight) - 32) + "px";
}
else
{
$_(contentCell).style.width = "100%";
$_(contentCell).style.height = "100%";
}
$_(this).tabList = [];
this.setAbsolutePosition(0, 0);
var selectTabSlot = function(myself, evt, source)
{
try
{
for(var i=0;i<$_(myself).tabList.length;i++)
{
if ($_($_(myself).tabList[i]).tab == source)
$_(myself).tabList[i].select();
else
$_(myself).tabList[i].deselect();
}
}
catch(e){}
}
this.setSlot("SelectTab", selectTabSlot);
}
wtNotebook.prototype = new wtWidget;
wtNotebook.prototype.newPage = function(pageTitle)
{
var retval = new wtNotebookPage(this, pageTitle);
$_(this).tabList.push(retval);
return retval;
}
wtNotebook.prototype.removePage = function(page)
{
if (isInteger(page))
$_(this).tabList[page].removeSelf();
else
page.removeSelf();
}
var wtTreeNode = function(parentWidget, caption)
{
if (arguments.length < 2)
return;
this.base = wtColumnLayout;
this.base(parentWidget, "");
$_(this).className += " wtTreeNode";
$_(this).nodeCell = this.addWidget("");
var c = new wtRowLayout(this, "100%");
c.addSpacer(18);
this.set("childRow", c);
$_(this).childLayout = new wtColumnLayout(c, "");
this.get("childLayout").get("style").width = "100%";
$_(this).nodeLayout = new wtRowLayout($_(this).nodeCell, "");
$_(this).indicatorCell = $_(this).nodeLayout.addWidget(new wtImage(null, "images/IndicatorMinus.png"));
$_(this).indicatorCell.setVisible(false);
$_(this).nodeLayout.addSpacer(5);
$_(this).imageCell = $_(this).nodeLayout.addWidget(new wtImage(null, "redist/continuum/16x16/mimetypes/image_alt.png"));
$_(this).nodeLayout.addSpacer(5);
$_(this).anchorCell = $_(this).nodeLayout.addWidget($_(this).anchor = new wtAnchor(null, caption));
$_(this).opened = true;
$_(this).isLeaf = true;
c.setDisplay(false);
this.setSelectable(false);
var toggleSlot = function(myself, evt, source)
{
$_(myself).opened = !$_(myself).opened;
myself.setOpened($_(myself).opened);
}
this.setSlot("Toggle", toggleSlot);
$_(this).indicatorCell.connect("treenode_toggle", "Click", this, "Toggle");
$_(this).imageCell.connect("treenode_toggle_2", "Click", this, "Toggle");
}
wtTreeNode.prototype = new wtColumnLayout;
wtTreeNode.prototype.setSelected = function(yes){$_(this).anchor.setSelected(yes);}
wtTreeNode.prototype.setEnabled = function(yes)
{
$_(this).wtDisabled = !yes;
$_(this).anchor.setEnabled(yes);
}
wtTreeNode.prototype.isEnabled = function()
{
return !($_(this).wtDisabled);
}
wtTreeNode.prototype.setHref = function(href){$_(this).anchor.setHref(href);}
wtTreeNode.prototype.resetHref = function(){$_(this).anchor.resetHref();}
wtTreeNode.prototype.setHandler = function(handler){$_(this).anchor.setHandler(handler);}
wtTreeNode.prototype.resetHandler = function(){$_(this).anchor.resetHandler();}
wtTreeNode.prototype.setOpened = function(yes)
{
if (yes)
{
$_(this).childRow.setDisplay(true);
$_(this).indicatorCell.clearAll();
$_(this).indicatorCell.addWidget(new wtImage(null, "images/IndicatorMinus.png"));
}
else
{
$_(this).childRow.setDisplay(false);
$_(this).indicatorCell.clearAll();
$_(this).indicatorCell.addWidget(new wtImage(null, "images/IndicatorPlus.png"));
}
this.set("opened", yes);
}
wtTreeNode.prototype._wtColumnLayout_addWidget = wtColumnLayout.prototype.addWidget;
wtTreeNode.prototype.addWidget = function(widget)
{
if (!$_(this).wtSlots.Toggle)
{
return this._wtColumnLayout_addWidget(widget);
}
if ($_(this).isLeaf)
{
$_(this).isLeaf = false;
$_(this).indicatorCell.setVisible(true);
$_(this).imageCell.clearAll();
$_(this).imageCell.addWidget(new wtImage(null, "redist/continuum/16x16/filesystems/folder.png"));
if (this.get("opened"))
this.get("childRow").setDisplay(true);
}
return $_(this).childLayout.addWidget(widget);
}
wtTreeNode.prototype.removeWidget = function(widget)
{
var row = _$(widget.get("parentNode"));
row.removeSelf();
if (this.get("childLayout").get("rows").length < 1)
{
this.set("isLeaf", true);
this.get("indicatorCell").setVisible(false);
if (! this.get("iconPath"))
{
this.get("imageCell").clearAll();
this.get("imageCell").addWidget(new wtImage(null, "redist/continuum/16x16/mimetypes/image_alt.png"));
}
this.get("childRow").setDisplay(false);
}
}
wtTreeNode.prototype.setIcon = function(iconPath)
{
$_(this).imageCell.clearAll();
this.set("iconPath", iconPath);
$_(this).imageCell.addWidget(new wtImage(null, iconPath));
}
wtTreeNode.prototype.clearIcon = function()
{
$_(this).imageCell.clearAll();
}
var wtTextBlock = function(parentWidget, text)
{
if (arguments.length < 2)
return;
this.base = wtShadowWidget;
this.base(parentWidget, 5);
$_(this).className += " wtTextBlock";
var contentCell = this.get("contentCell");
$_(contentCell).className += " wtTextBlockContent";
contentCell.get("style").border = "1px black solid";
contentCell.addWidget(text);
}
wtTextBlock.prototype = new wtShadowWidget;
wtTextBlock.prototype.setText = function(text)
{
var contentCell = this.get("contentCell");
contentCell.clearAll();
return contentCell.addWidget(text);
}
var wtToolbarItem = function(_parent, _name, _imageUrl, _imageWidth, _imageHeight)
{
this.base = wtWidget;
this.base(_parent,"td");
this.set("toolbar",_parent);
var overItemHandler = function(widget, evt, source)
{
if (!widget.get("selected"))
widget.set("bgColor","lightgrey");
}
var outItemHandler = function(widget, evt, source)
{
if (!widget.get("selected"))
widget.set("bgColor","white");
}
var selectItemHandler = function(widget, evt, source)
{
widget.emit("UnselectOld");
$_(widget).selected = true;
widget.set("bgColor","lightgreen");
}
var unselectItemHandler = function(widget, evt, source)
{
$_(widget).selected = false;
widget.set("bgColor","white");
}
$_(this).selected = false;
this.setSignal("Unselect");
this.setSlot("OverItemSlot",overItemHandler);
this.setSlot("OutItemSlot",outItemHandler);
this.setSlot("SelectItemSlot",selectItemHandler);
this.setSlot("UnselectItemSlot",unselectItemHandler);
this.connect("over_item","MouseOver",this,"OverItemSlot");
this.connect("out_item","MouseOut",this,"OutItemSlot");
this.connect("select_item","Click",this,"SelectItemSlot");
this.connect("unselect_item","Unselect",this,"UnselectItemSlot");
var layout = new wtColumnLayout(this,_imageWidth);
var image = new wtImage(layout,_imageUrl);
image.setSize(_imageWidth,_imageHeight);
var textRow = new wtWidget(layout,"div");
textRow.setSelectable(false);
textRow.set("align","center");
textRow.addWidget(_name);
}
wtToolbarItem.prototype = new wtWidget;
wtToolbarItem.prototype.setHandler = function(_onClickHandler)
{
if (_onClickHandler!=null)
{
this.setSlot("ClickItemSlot",_onClickHandler);
this.connect("click_item","Click", this,"ClickItemSlot");
}
}
var wtToolbar = function(_parent, _width, _imageWidth, _imageHeight)
{
this.base = wtView
this.base(_parent, _width, "auto");
if (isMSIE())
{
this.get("style").overflow = "scroll";
}
this.set("align","left");
var unselectAllHandler = function(widget, evt, source)
{
var item = widget.get("selectedItem");
if (item!=null)
{
item.emit("Unselect");
}
widget.set("selectedItem",source);
}
$_(this).table = new wtWidget(this,"table");
$_(this).table.set("border","1px");
$_(this).table.set("borderColor","lightgrey");
$_(this).tbody = new wtWidget(this.get("table"),"tbody");
$_(this).trow = new wtWidget(this.get("tbody"),"tr");
$_(this).trow.setSlot("UnselectOldItemSlot",unselectAllHandler);
$_(this).trow.set("selectedItem",null);
$_(this).imageWidth = _imageWidth;
$_(this).imageHeight = _imageHeight;
}
wtToolbar.prototype = new wtWidget;
wtToolbar.prototype.addItem = function(_name, _imageUrl, _onClickHandler)
{
return this.insertItem(this.getSize(),_name,_imageUrl,_onClickHandler);
}
wtToolbar.prototype.insertItem = function(_index, _name, _imageUrl, _onClickHandler)
{
var _parent = this.get("trow");
var retval = new wtToolbarItem(null,_name,_imageUrl,this.get("imageWidth"), this.get("imageHeight"));
if (this.getItem(_index)==null)
$_(_parent).appendChild($_(retval));
else $_(_parent).insertBefore($_(retval),$_(this.getItem(_index)));
retval.setSignal("UnselectOld");
retval.connect("unselect_all_item","UnselectOld",this.get("trow"),"UnselectOldItemSlot");
retval.setHandler(_onClickHandler);
return retval;
}
wtToolbar.prototype.removeItem = function(_index)
{
if (_index<0 || _index>=this.getSize())
return;
if (this.getItem(_index)!=null)
this.getItem(_index).removeSelf();
}
wtToolbar.prototype.getSelectedItem = function()
{
return this.get("trow").get("selectedItem");
}
wtToolbar.prototype.getItem = function(_index)
{
if (_index<0 || _index>=this.getSize())
return null;
var retval = this.get("trow").get("childNodes")[_index];
return _$(retval);
}
wtToolbar.prototype.getSize = function()
{
return this.get("trow").get("childNodes").length;
}
Documentation generated by
JSDoc on Sun May 13 11:26:24 2007